@import '@/style/imports';

.page-category-index {
  width: 100%;
  height: 100vh;
  background: #ffffff;
  box-sizing: border-box;
  /*  #ifdef  h5  */
  padding-top: $navigate-height-h5;
  /*  #endif  */
  &.good-category {
    .category-comps-not {
      box-sizing: border-box;
      background: #ffffff;
      @include page-scroll(0, $tabbar-height);
    }
  }
  .search-input-fixed {
    z-index: $z-index-toolbar + 1;
  }
  .category__tabs {
    background: #fff;
    position: fixed;
    padding-top: 10px;
    top: 260px;
    height: $tabs-height + 10px;
  }
  .category-comps {
    box-sizing: border-box;
    background: #ffffff;
    /*  #ifdef  weapp  */
    @include page-scroll($tabs-height + 10px, $tabbar-height);
    /*  #endif  */
    /*  #ifdef  h5  */
    @include page-scroll($tabs-height + $navigate-height-h5 + 10px, $tabbar-height);
    /*  #endif  */
  }
  .category-comps-not {
    box-sizing: border-box;
    background: #ffffff;
    /*  #ifdef  weapp  */
    @include page-scroll(0, $tabbar-height);
    /*  #endif  */
    /*  #ifdef  h5  */
    @include page-scroll($navigate-height-h5, $tabbar-height);
    /*  #endif  */
  }
  .shop-category__wrap {
    &.all {
      .category-list__scroll {
        width: 100%;
        left: 0;
      }
    }
    .category-list__scroll {
      @include page-scroll($tabs-height + $navigate-height, 0);
      /*  #ifdef  h5  */
      @include page-scroll($tabs-height + $navigate-height-h5, 0);
      /*  #endif  */
      top: 0;
      left: 25vw;
      width: 75vw;
    }
  }
  .category-list {
    height: 100%;
    background-color: #f5f5f5;
    display: flex;
    justify-content: flex-start;
    box-sizing: border-box;
    &__nav {
      width: 25vw;
      height: 100%;
      text-align: center;
      background: #fff;
      box-sizing: border-box;
    }
    &__content {
      width: 75vw;
      height: 100%;
      background: #fff;
      box-sizing: border-box;
    }
  }

  .category-nav {
    &__content {
      width: 160px;
      height: 85px;
      overflow: hidden;
      white-space: nowrap;
      font-size: 26px;
      text-overflow: ellipsis;
      border-left: 7px solid transparent;
      line-height: 85px;
      margin: 0 auto;
      box-sizing: border-box;
      background-color: #fff;
    }
    &__content:first-child {
      border-top: 0;
    }
    &__content-checked {
      transition: background-color 0.5s;
      width: 100%;
      color: #d92128;
      background-color: #f5f5f5;
      border-left: 15px solid;
      border-color: #d92128;
      box-sizing: border-box;
    }
    .hot-tag {
      display: inline-block;
      margin-right: 6px;
      padding: 4px;
      line-height: 1;
      vertical-align: super;
      text-align: center;
      background: #ff5000;
      border-radius: 6px;
      color: #fff;
      font-size: 20px;
      &::after {
        content: '热';
      }
    }
  }

  // 分类goodItem
  .grid-goods {
    width: 100%;
    box-sizing: border-box;
    padding: 20px;
    background: #f5f5f5;
   
    .goodItem {
      width: 100%;
      display: flex;
      background: #fff;
      margin-bottom: 20px;
      height: 180px;
      border-radius: 10px;
      overflow: hidden;
      &:last-child {
        margin-bottom: 0;
      }
      .left {
        width: 170px;
        height: 170px;
        position: relative;
        flex-shrink: 0;
        .goodImg,
        .itemImg {
          width: 100%;
          height: 100%;
          img {
            width: 100%;
          }
        }
      }
      .right {
        flex: 1;
        width: 100%;
        padding: 10px 15px;
        height: 100%;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        overflow: hidden;
        .goodName {
          color: #000;
          width: 100%;
          font-size: 24px;
          white-space: nowrap;
          text-overflow:ellipsis;
          overflow: hidden;
        }
        .goodPrice {
          color: #d92128;
          font-weight: bold;
          padding-top: 10px;
          .symbol {
            font-weight: normal;
          }
        }
        .itemextra {
          display: flex;
          align-items: flex-end;
          justify-content: space-between;
          .goods-item__release-btn {
            text-align: center;
            color: #00c3ff;
            font-size: 24px;
            &.released {
              color: #666;
            }
          }
          .itemShareBtn {
            border: none;
            background: transparent;
            padding: 0;
            margin: 0;
            line-height: 1;
            color: #00c3ff;
            font-size: 36px;
            &::after {
              border: none;
            }
            .iconfont {
              font-size: 36px;
            }
          }
        }
      }
      &.outSale {
        .left {
          .goodImg {
            opacity: 0.6;
          }
          &::after {
            content: '已售罄';
            position: absolute;
            width: 70%;
            height: 70%;
            top: 50%;
            left: 50%;
            color: #fff;
            font-weight: bold;
            background: rgba(0, 0, 0, 0.5);
            border-radius: 100%;
            display: flex;
            font-size: 24px;
            align-items: center;
            justify-content: center;
            transform: translate(-50%, -50%);
          }
        }
        .right {
          .goodName,
          .goodPrice {
            color: #999 !important;
          }
        }
      }
    }
  }
}
